package com.wkbb.sports.dto;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.wkbb.common.handler.JsonUtil;
import com.wkbb.sports.model.HlifeTrainStudentDetail;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

import com.wkbb.sports.enums.SportsModelTypeEnum;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class TrainStudentDto {

    @ApiModelProperty(value = "编号")
    private Long id;
    @ApiModelProperty(value = "训练id")
    private Long trainId;
    @ApiModelProperty(value = "平均心率")
    private Integer avgHeartRate;
    @ApiModelProperty(value = "成绩2")
    private String achievement2;
    @ApiModelProperty(value = "项目ID")
    private Long projectId;

    @ApiModelProperty(value = "学校ID")
    private Long orgId;
    @ApiModelProperty(value = "学校名称")
    private String orgName;
    @ApiModelProperty(value = "年级ID")
    private Long gradeId;
    @ApiModelProperty(value = "年级ID")
    private String gradeName;
    @ApiModelProperty(value = "班级ID")
    private Long classId;
    @ApiModelProperty(value = "班级名称")
    private String className;

    @ApiModelProperty(value = "组别")
    private String groupId;
    @ApiModelProperty(value = "老师ID")
    private Long teacherId;

    @ApiModelProperty(value = "设备ID")
    private String deviceId;
    @ApiModelProperty(value = "学生ID")
    private Long studentId;
    @ApiModelProperty(value = "学生名称")
    private String studentName;
    @ApiModelProperty(value = "性别(1男2女)")
    private Byte sex;
    @ApiModelProperty(value = "学号")
    private String studentNo;
    @ApiModelProperty(value = "标准成绩")
    private String achievement;
    @ApiModelProperty(value = "得分")
    private Double score;
    @ApiModelProperty(value = "成绩等级：1优秀 2良好 3及格 4不及格")
    private int scoreLevel;
    @ApiModelProperty(value = "加分项得分")
    private Double plusScore;
    @ApiModelProperty(value = "失误总次数")
    private Integer errorCount;
    @ApiModelProperty(value = "失误总耗时")
    private Integer errorTime;
    @ApiModelProperty(value = "平均耗时")
    private Integer avgTime;
    @ApiModelProperty(value = "有效平均值(中位数)")
    private Integer medianTime;
    @ApiModelProperty(value = "失误 损失次数")
    private Integer lossesCount1;
    @ApiModelProperty(value = "甩绳速度偏慢 损失次数")
    private Integer lossesCount2;
    @ApiModelProperty(value = "进入状态过慢 损失次数")
    private Integer lossesCount3;
    @ApiModelProperty(value = "高一档分数段")
    private Integer HigherScore;
    @ApiModelProperty(value = "高一档分数段 要求次数")
    private Integer HigherScoreCount;
    @ApiModelProperty(value = "进入状态耗时")
    private Integer intoStateTime;
    @ApiModelProperty(value = "次数提升空间")
    private Integer improveCount;
    @ApiModelProperty(value = "分数提升空间")
    private Double improveScore;
    @ApiModelProperty(value = "家长消息发送标识")
    private Byte familySendFlag;
    @ApiModelProperty(value = "项目类型")
    private Byte projectKind;
    @ApiModelProperty(value = "模式id")
    private Byte modelType;
    @ApiModelProperty(value = "开始时间")
    private Date startTime;
    @ApiModelProperty(value = "老师名称")
    private String teacher;

    @ApiModelProperty(value = "敏捷最快反应时间")
    private Integer fastReaction;
    @ApiModelProperty(value = "敏捷最慢反应时间")
    private Integer slowReaction;
    @ApiModelProperty(value = "敏捷平均反应时间")
    private Integer avgReaction;
    @ApiModelProperty(value = "敏捷正确次数")
    private Integer rightCount;
    @ApiModelProperty(value = "敏捷错误次数")
    private Integer wrongCount;
    @ApiModelProperty(value = "完成总数")
    private Integer totalCount;
    @ApiModelProperty(value = "平均准确率")
    private Double avgRightRate;
    @ApiModelProperty(value = "训练详情")
    private List<TrainStudentDetailDto> details;
    @ApiModelProperty(value = "模式名称")
    public String getModelTypeName() {
        try {
            return SportsModelTypeEnum.getDesc(modelType.intValue());
        } catch (Throwable e) {
            return "";
        }
    }
}
